package club.kingyin.kyblog.core.business.mapper.admin;

import club.kingyin.kyblog.core.business.dao.admin.Info;
import club.kingyin.kyblog.core.business.dao.admin.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author : kingyins
 * @version : 1.0
 * @program : Ky-Blog
 * @description : 在此处添加类描述
 * @create : 2021年08月19日 16:29
 **/
@Mapper
public interface UserMapper {

    @Select("select name,introduction,avatar from user where username=#{username}")
    User selectUserInfo(User user);

    @Select("select username from user where username = #{username} and password = #{password}")
    User login(User user);

    @Update("update user set name = #{name} where username = #{username}")
    void update(User user);
}
